package com.alennus.blog.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by pactera on 2018/5/16.
 */
@Data
@Document
public class Menu extends AbstractDocument {

    private String title; //菜单名称
    private String resourceType; //菜单类型
    private String url;//资源路径.
    private String permission; //权限字符串,menu例子：role:*，button例子：role:create,role:update
    private String parentId; //父编号
    @Transient
    private String parentName; //父编号
    private Boolean available = Boolean.FALSE;
    private String type;//菜单图标类型
    private String description;//菜单描述
    @Transient
    private Boolean expand = Boolean.FALSE;
    @Transient
    private Boolean loading = Boolean.FALSE;
    @Transient
    private List<Menu> children = new ArrayList();
    @Transient
    private Boolean checked = false;

    private String createdDate;

    private String updateDate;
}
